<template>
	<a-tabs default-active-key="styles" size="small">
		<a-tab-pane key="styles" :tab="i18n('componentStyle.style','风格')">
			<a-form-item :label="imageI18n('backgroundImage','背景图')">
				<upload-common :globalConfig="conf.styles" @uploadCommon="uploadCommon"></upload-common>
			</a-form-item>
		</a-tab-pane>
	</a-tabs>
</template>

<script>
/**
 * 图片
 */
import ComponentDef from "@/views/modules/design/right-component/common/component-def.js";
import UploadCommon from "@/views/modules/design/right-component/common/upload-common.vue"
export default {
	name: "ImageDef",
	mixins:[ComponentDef],
	components:{
        UploadCommon
	},
	data(){
		return{
			conf:{
				styles:{
					mode:"material",
					imgName:'gif',
				},
			}
		}
	},
	created() {
		this.conf.styles=Object.assign(this.conf.styles,this.config.styles);
	},
	methods:{
		i18n(name,text,key){
			return this.$ti18(name,text,"componentStyleLang",key);
		},
		imageI18n(name,text,key){
			return this.$ti18(name,text,"imageLang",key);
		},
		uploadCommon(globalConfig){
			this.config.styles = Object.assign(this.config.styles,globalConfig);
		},
	}
}
</script>

<style scoped>

</style>
